From: Ben Hutchings Date: Thu, 15 Jan 2015 23:16:35 +0000 (+0000) Subject: userns: Fix ABI change in 3.16.7-ckt4 X-Git-Tag: archive/raspbian/4.9.13-1+rpi1~26^2^2~2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/%22mailto:kde%40ewsoftware.de//%22style.css/%22/%22http:/www.example.com/%22mailto:kde%40ewsoftware.de/%22style.css/%22?a=commitdiff_plain;h=4b6c534086ee6d4d2cb302862f571e66dedcd83a;p=linux-4.9.git userns: Fix ABI change in 3.16.7-ckt4 The fix for CVE-2014-8989 added a new member to struct user_namespace. This is always allocated, and the new member is always used, in non-modular code. Move it to the end of the structure and hide it from genksyms. Also hide the new #include in kernel/groups.c. Gbp-Pq: Topic debian Gbp-Pq: Name userns-fix-abi-change-in-3.16.7-ckt4.patch --- diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index e92abf9e796f..828ac220cfff 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -31,13 +31,16 @@ struct user_namespace { kuid_t owner; kgid_t group; unsigned int proc_inum; - unsigned long flags; /* Register of per-UID persistent keyrings for this namespace */ #ifdef CONFIG_PERSISTENT_KEYRINGS struct key *persistent_keyring_register; struct rw_semaphore persistent_keyring_register_sem; #endif + +#ifndef __GENKSYMS__ + unsigned long flags; +#endif }; extern struct user_namespace init_user_ns; diff --git a/kernel/groups.c b/kernel/groups.c index 664411f171b5..0d65405490e3 100644 --- a/kernel/groups.c +++ b/kernel/groups.c @@ -6,7 +6,9 @@ #include #include #include +#ifndef __GENKSYMS__ #include +#endif #include /* init to 2 - one for init_task, one to ensure it is never freed */